﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Security.Principal;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Security;
using System.Web.UI;
using Ashlen.Portal.Core;
using Ashlen.Portal.Core.DataInterfaces;
using Ashlen.Portal.Data.SqlServer;
using System.Web;
using System.Configuration;

namespace Ashlen.Portal.Controllers
{
    [HandleError]
    [OutputCache(Location = OutputCacheLocation.None)]
    public class UtilityController : Controller
    {
        private readonly IUtilityDao _utility;

        public UtilityController()
        {
            _utility = new UtilityDao();
        }

        public UtilityController(string connectionString)
        {
            _utility = new UtilityDao(connectionString);
        }

        public string GetConfigValue(string name)
        {
            return _utility.GetConfig(Ashlen.Portal.Data.SqlServer.Constants.APPLICATION, name);
        }
    }
}
